#include <iostream>
using namespace std;

int main() {
    // if 语句
    int a = 10;
    if (a > 5) {
        cout << "a is greater than 5" << endl;
    }

    // if 语句嵌套
    int b = 10;
    int c = 20;
    if (b == 10) {
        if (c == 20) {
            cout << "b is 10 and c is 20" << endl;
        }
    }

    // switch语句
    a = 2;
    switch (a) {
        case 1:
            cout << "a is 1" << endl;
            break;
        case 2:
            cout << "a is 2" << endl;
            break;
        default:
            cout << "a is neither 1 nor 2" << endl;
    }

    return 0;
}
